<html>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<head>
<title>Section 5.3.&nbsp; Standard Input, Standard Output, and Standard Error</title>
<link rel="STYLESHEET" type="text/css" href="images/style.css">
<link rel="STYLESHEET" type="text/css" href="images/docsafari.css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/team.gif" width="60" height="17" border="0" align="absmiddle"  alt="Team BBL"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=ch05lev1sec2.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<a href=ch05lev1sec4.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
<br><table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td valign="top"><a name="ch05lev1sec3"></a>
<h3 class="docSection1Title">5.3. Standard Input, Standard Output, and Standard Error</h3>
<p class="docText"><a name="idd1e35082"></a><a name="idd1e35085"></a><a name="idd1e35090"></a><a name="idd1e35095"></a><a name="idd1e35100"></a><a name="idd1e35105"></a><a name="idd1e35108"></a><a name="idd1e35111"></a><a name="idd1e35116"></a><a name="idd1e35119"></a><a name="idd1e35124"></a><a name="idd1e35129"></a><a name="idd1e35134"></a><a name="idd1e35139"></a><a name="idd1e35144"></a><a name="idd1e35149"></a><a name="idd1e35154"></a><a name="idd1e35159"></a>Three streams are predefined and automatically available to a process: standard input, standard output, and standard error. These streams refer to the same files as the file descriptors <tt>STDIN_FILENO</tt>, <tt>STDOUT_FILENO</tt>, and <tt>STDERR_FILENO</tt>, which we mentioned in <a class="docLink" href="ch03lev1sec2.html#ch03lev1sec2">Section 3.2</a>.</P>
<p class="docText">These three standard I/O streams are referenced through the predefined file pointers <tt>stdin</tt>, <tt>stdout</tt>, and <tt>stderr</tt>. The file pointers are defined in the <tt>&lt;stdio.h&gt;</tt> header.</P>

<ul></UL></TD></TR></table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/team.gif" width="60" height="17" border="0" align="absmiddle"  alt="Team BBL"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href=ch05lev1sec2.html><img src="images/prev.gif" width="60" height="17" border="0" align="absmiddle" alt="Previous Page"></a>
<a href=ch05lev1sec4.html><img src="images/next.gif" width="60" height="17" border="0" align="absmiddle" alt="Next Page"></a>
</div></td></tr></table>
</body></html><br>
<table width="100%" cellspacing="0" cellpadding="0"
style="margin-top: 0pt; border-collapse: collapse;"> 
<tr> <td align="right" style="background-color=white; border-top: 1px solid gray;"> 
<a href="http://www.zipghost.com/" target="_blank" style="font-family: Tahoma, Verdana;
 font-size: 11px; text-decoration: none;">The CHM file was converted to HTM by Trial version of <b>ChmD<!--74-->ecompiler</b>.</a>
</TD>
</TR><tr>
<td align="right" style="background-color=white; "> 
<a href="http://www.etextwizard.com/download/cd/cdsetup.exe" target="_blank" style="font-family: Tahoma, Verdana;
 font-size: 11px; text-decoration: none;">Download <b>ChmDec<!--74-->ompiler</b> at: http://www.zipghost.com</a>
</TD></tr></table>
